package cs340.stormtroopers.hypeerweb;

import java.io.ObjectStreamException;
import java.lang.reflect.InvocationTargetException;

import phase6.Command;
import phase6.GlobalObjectId;
import phase6.PeerCommunicator;
public class NodeProxy
    extends Node
{
    private GlobalObjectId globalObjectId;

    public NodeProxy(GlobalObjectId globalObjectId){
    	super();
        this.globalObjectId = globalObjectId;
    }
    
    public boolean setGlobalObjectId(GlobalObjectId globalId)
    {
    	globalObjectId = globalId;
    	return true;
    }

    public boolean equals(java.lang.Object p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "java.lang.Object";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "equals", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public java.lang.String toString(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "toString", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        
        return (java.lang.String)"Proxy: " + result;
    }

    public int compareTo(java.lang.Object p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "java.lang.Object";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "compareTo", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Integer)result;
    }

    public boolean accept(cs340.stormtroopers.hypeerweb.Visitor p0, cs340.stormtroopers.hypeerweb.Parameters p1){
        String[] parameterTypeNames = new String[2];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Visitor";
        parameterTypeNames[1] = "cs340.stormtroopers.hypeerweb.Parameters";
        Object[] actualParameters = new Object[2];
        actualParameters[0] = p0;
        actualParameters[1] = p1;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "accept", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }


    public phase6.LocalObjectId getLocalObjectId(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getLocalObjectId", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (phase6.LocalObjectId)result;
    }

    public boolean addToHyPeerWeb(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "addToHyPeerWeb", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public int getWebIdValue(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getWebIdValue", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Integer)result;
    }

    public boolean updateState(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "updateState", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }
    
    public cs340.stormtroopers.hypeerweb.Contents getContents(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getContents", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Contents)result;
    }

    public java.util.ArrayList getDownPointers(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getDownPointers", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (java.util.ArrayList)result;
    }

     public boolean addDownPointer(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "addDownPointer", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean removeDownPointer(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "removeDownPointer", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean addNeighbor(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "addNeighbor", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public java.util.ArrayList getNeighbors(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getNeighbors", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (java.util.ArrayList)result;
    }

    public java.util.ArrayList getNeighborsBiggerThanMe(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getNeighborsBiggerThanMe", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (java.util.ArrayList)result;
    }

    public boolean addUpPointer(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "addUpPointer", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public java.util.ArrayList getUpPointers(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getUpPointers", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (java.util.ArrayList)result;
    }

    public cs340.stormtroopers.hypeerweb.SimplifiedNodeDomain constructSimplifiedNodeDomain(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "constructSimplifiedNodeDomain", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.SimplifiedNodeDomain)result;
    }

    public cs340.stormtroopers.hypeerweb.Node getFold(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Node getSurrogateFold(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getSurrogateFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Node getInverseSurrogateFold(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getInverseSurrogateFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Connections getConnections(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getConnections", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Connections)result;
    }

    public cs340.stormtroopers.hypeerweb.Connections getChildConnections(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getChildConnections", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Connections)result;
    }

    public cs340.stormtroopers.hypeerweb.WebId getWebId(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getWebId", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.WebId)result;
    }

    public boolean removeNeighbor(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "removeNeighbor", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }
    
    public boolean removeUpPointer(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "removeUpPointer", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean setConnections(cs340.stormtroopers.hypeerweb.Connections p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Connections";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setConnections", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }
    
    public boolean setFold(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean setInverseSurrogateFold(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setInverseSurrogateFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean setSurrogateFold(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setSurrogateFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean setWebId(cs340.stormtroopers.hypeerweb.WebId p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.WebId";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setWebId", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public void printFold(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "printFold", parameterTypeNames, actualParameters, false);
        PeerCommunicator.getSingleton().sendASynchronous(globalObjectId, command);
    }

    public cs340.stormtroopers.hypeerweb.Node findEndCapNode(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "findEndCapNode", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Node findInsertionPoint(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "findInsertionPoint", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public boolean updateNewNodesAssociates(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "updateNewNodesAssociates", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean updateInsertionPoint(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "updateInsertionPoint", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean addMeToMyHyPeerWeb(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "addMeToMyHyPeerWeb", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public cs340.stormtroopers.hypeerweb.Node findSmallestChildlessNeighbor(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "findSmallestChildlessNeighbor", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Node fromMeToEndCapNode(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "fromMeToEndCapNode", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public cs340.stormtroopers.hypeerweb.Node fromMeToInsertionPoint(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "fromMeToInsertionPoint", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public boolean removeFromHyPeerWeb(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "removeFromHyPeerWeb", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public int getHeight(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "getHeight", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Integer)result;
    }
    
    public cs340.stormtroopers.hypeerweb.Node findDeletionPoint(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "findDeletionPoint", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }
    
    public boolean setHeight(int p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "int";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "setHeight", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean removeSelf(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "removeSelf", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean takePlaceOf(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "takePlaceOf", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public cs340.stormtroopers.hypeerweb.Node findParent(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "findParent", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public boolean disconnectMeAsFold(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "disconnectMeAsFold", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }

    public boolean disconnectMeAsChild(cs340.stormtroopers.hypeerweb.Node p0){
        String[] parameterTypeNames = new String[1];
        parameterTypeNames[0] = "cs340.stormtroopers.hypeerweb.Node";
        Object[] actualParameters = new Object[1];
        actualParameters[0] = p0;
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "disconnectMeAsChild", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (Boolean)result;
    }
    
    public cs340.stormtroopers.hypeerweb.Node followBiggestNeighbor(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "cs340.stormtroopers.hypeerweb.Node", "followBiggestNeighbor", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        if(result instanceof InvocationTargetException)
        {
        	((InvocationTargetException) result).printStackTrace();
        }
        return (cs340.stormtroopers.hypeerweb.Node)result;
    }

    public int hashCode(){
        String[] parameterTypeNames = new String[0];
        Object[] actualParameters = new Object[0];
        Command command = new Command(globalObjectId.getLocalObjectId(), "java.lang.Object", "hashCode", parameterTypeNames, actualParameters, true);
        Object result = PeerCommunicator.getSingleton().sendSynchronous(globalObjectId, command);
        return (Integer)result;
    }
/*
	@Override
	protected Object writeReplace() throws ObjectStreamException
	{
		return this;
	}

	@Override
	protected void setDownPointers(ArrayList<Node> newDownPointers)
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void setUpPointers(ArrayList<Node> newUpPointers)
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void updateInsertionPoint()
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected Node fromMeToInsertionPoint()
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected Node fromMeToEndCapNode()
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void removeSelf()
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void disconnectMeAsChild(Node foldOfLeavingNode)
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void disconnectMeAsFold(Node parentOfLeavingNode)
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected Node findParent()
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected void takePlaceOf(Node leavingNode)
	{
		throw new UnsupportedOperationException();
	}

	@Override
	protected Node followBiggestNeighbor()
	{
		throw new UnsupportedOperationException();
	}
	*/
	
	@Override
	protected Object writeReplace() throws ObjectStreamException
	{
		return this;
	}

}